home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / pxfestrget.z / pxfestrget
Encoding:
Text File  |  2002-10-03  |  4.5 KB  |  107 lines

  1. PXFESTRGET(3F)                                        Last changed: 1-22-99
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFEESSTTRRGGEETT - Accesses a single string element of a structure component
  6.      that is an array
  7.  
  8. SSYYNNOOPPSSIISS
  9.      SSUUBBRROOUUTTIINNEE PPXXFFEESSTTRRGGEETT ((_j_h_a_n_d_l_e,, _c_o_m_p_n_a_m,, _i_n_d_e_x,, _v_a_l_u_e,, _i_l_e_n,, _i_e_r_r_o_r))
  10.      IINNTTEEGGEERR _j_h_a_n_d_l_e,, _i_n_d_e_x,, _i_l_e_n,, _i_e_r_r_o_r
  11.      CCHHAARRAACCTTEERR*_n _c_o_m_p_n_a_m,, _v_a_l_u_e
  12.  
  13. IIMMPPLLEEMMEENNTTAATTIIOONN
  14.      UNICOS, UNICOS/mk, and IRIX systems
  15.  
  16. SSTTAANNDDAARRDDSS
  17.      IEEE standard interface for FORTRAN 77
  18.  
  19. DDEESSCCRRIIPPTTIIOONN
  20.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  21.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  22.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  23.      F77 compiler.
  24.  
  25.      The PPXXFFEESSTTRRGGEETT routine returns a string contained in a single element
  26.      of a structure component that is an array.
  27.  
  28.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  29.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  30.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  31.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  32.      IRIX, the default kind is KKIINNDD==44.
  33.  
  34.      The following is a list of valid arguments for this subroutine:
  35.  
  36.      _j_h_a_n_d_l_e   An input handle variable created with PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F).
  37.  
  38.      _c_o_m_p_n_a_m   An input character variable or array element containing the
  39.                desired structure component name.
  40.  
  41.      _i_n_d_e_x     An input integer variable for the desired index in the
  42.                array.
  43.  
  44.      _v_a_l_u_e     An output character variable or array element that will
  45.                contain the string referenced by _c_o_m_p_a_n_m, _i_n_d_e_x, and
  46.                _j_h_a_n_d_l_e.
  47.  
  48.      _i_l_e_n      An output integer variable for the length of the returned
  49.                character string.
  50.  
  51.      _i_e_r_r_o_r    An output integer variable that contains zero if PPXXFFEESSTTRRGGEETT
  52.                was successful or nonzero if PPXXFFEESSTTRRGGEETT was not successful.
  53.  
  54.      The PPXXFFEESSTTRRGGEETT subroutine may return any of the following error
  55.      values:
  56.  
  57.      EENNOONNAAMMEE   If the component name is not defined for this structure.
  58.  
  59.      EETTRRUUNNCC    If the declared length of the character argument is
  60.                insufficient to contain the string to be returned.
  61.  
  62.      EENNOOMMEEMM    If there is insufficent memory to create data structures
  63.                needed by the routine.
  64.  
  65.      EEBBAADDHHAANNDDLLEE
  66.                If _j_h_a_n_d_l_e is an invalid handle or has an incorrect handle
  67.                type (UNICOS and UNICOS/mk systems only).
  68.  
  69. EEXXAAMMPPLLEESS
  70.      In this example, PPXXFFGGEETTGGRRGGIIDD(3F) and PPXXFFGGEETTGGIIDD(3F) are used to obtain
  71.      the first user name in the current process' group.
  72.  
  73.  program pxftest
  74.  integer igid, ierror, jgroup, len, imax, i
  75.  character*30 loginname
  76.  CALL PXFSTRUCTCREATE('group',jgroup,ierror)
  77.     if (ierror .ne. 0) then
  78.        print *,'FAILED: PXFSTRUCTCREATE with error = ',ierror
  79.     else
  80.        CALL PXFGETGID(igid,ierror)
  81.        CALL PXFGETGRGID(igid,jgroup,ierror)
  82.        if (ierror .ne. 0) then
  83.            print *,'FAILED: PXFGETGRGID with error = ',ierror
  84.        else
  85.            CALL PXFINTGET(jgroup,'gr_nmem',imax,ierror)
  86.            if (ierror .ne. 0) then
  87.               print *,'FAILED: PXFINTGET with error = ',ierror
  88.            else
  89.               if (imax .gt. 0) then
  90.                  do i = 1,imax
  91.                     CALL PXFESTRGET(jgroup,'gr_mem',i,loginname,len,ierror)
  92.                     print *,loginname
  93.                  end do
  94.               else
  95.                  print *,'FAILED: Could not test PXFESTRGET'
  96.               endif
  97.            endif
  98.        endif
  99.     endif
  100.  end
  101.  
  102. SSEEEE AALLSSOO
  103.      PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F)
  104.  
  105.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
  106.      version of this man page.
  107.